Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Qi UTXO related types #204

Merged
merged 20 commits into from
Jun 18, 2024
Merged

Update Qi UTXO related types #204

merged 20 commits into from
Jun 18, 2024

Conversation

rileystephens28
Copy link
Member

Initial pass at updating UTXO related types. These changed are currently untested.

Copy link
Contributor

@alejoacosta74 alejoacosta74 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a couple of comments. Will continue reviewing

src/transaction/utxo.ts Outdated Show resolved Hide resolved
src/transaction/utxo.ts Outdated Show resolved Hide resolved
throw new Error(`Account ${info.account} not found in wallet`);
}
// validate Outpoint
if (info.outpoint.Txhash == null || info.outpoint.Index == null || info.outpoint.Denomination == null) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to replace properties name here with lowercase (i.e. txhash, index, denomination

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


import type { PerformActionRequest, Subscriber, Subscription } from './abstract-provider.js';
import type { Networkish } from './network.js';
import type { TransactionRequest } from './provider.js';
import type { Provider, QuaiTransactionRequest, TransactionRequest, TransactionResponse } from './provider.js';
import { UTXOEntry, UTXOTransactionOutput } from '../transaction/utxo.js';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UTXOEntry and UTXOTransactionOutput are unused imports

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

(async () => {
const address = await resolveAddress(hexlify(tx.outputs![i].address));
tx.outputs![i].address = getBytes(address);
})(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compile error:

error TS2322: Type 'Uint8Array' is not assignable to type 'string'.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Copy link
Contributor

@alejoacosta74 alejoacosta74 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All test pass

@rileystephens28 rileystephens28 merged commit d4e211b into master Jun 18, 2024
@rileystephens28 rileystephens28 deleted the utxo-type-update branch June 20, 2024 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants